-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
packer: 0.10.1 -> 0.12.1 #21469
packer: 0.10.1 -> 0.12.1 #21469
Conversation
Update was done using new `updateScript`. Not the prettiest thing, but it works.
''; | ||
|
||
passthru.updateScript = writeScript "update-packer" '' | ||
#!${bash}/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't use https://github.com/kamilchm/go2nix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried to do it, but it wasn't able to catch all those extra deps that are specified in vendor/vendor.json
in packer repository - resulting .nix
-file contained only packer
sources itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you try to run make deps
in packer source before go2nix save
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, it's something inconsistent in packer vendor dir, it looks like it's half managed by govendor
with not all deps checked in into its repo
mv bin/* $out/bin # */ | ||
''; | ||
|
||
passthru.updateScript = writeScript "update-packer" '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would be better served with a separate .sh file and substituteInPlace for the PATH and what-not. what do you think, @garbas? Seems not good having this in line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you run shellcheck
on this script? It looks pretty complicated, I think shellcheck would be good for maintainability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably it would be good to have this in a separate file. but i understand why it is done inline, it is just easier to iterate. i would say it is up to a maintainer of the package to decide what is easier for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey all. The packer build used to be very complicated but has been made much easier now through vendoring. I went ahead and made another simplified version over here: #21656 , unfortunately it's missing the update script. |
Is there anything to salvage from this PR? |
No. |
Update was done using
updateScript
that was also added by this commit.Not the prettiest thing, but it works.
Motivation for this change
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)